<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>png++: png::reader&lt; istream &gt; Class Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">png++
   &#160;<span id="projectnumber">0.2.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacepng.html">png</a>      </li>
      <li class="navelem"><a class="el" href="classpng_1_1reader.html">reader</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">png::reader&lt; istream &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="png::reader" --><!-- doxytag: inherits="png::io_base" -->
<p>The PNG reader class template. This is the low-level reading interface--use image class or consumer class to actually read images.  
 <a href="classpng_1_1reader.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="reader_8hpp_source.html">reader.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for png::reader&lt; istream &gt;:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpng_1_1reader.png" usemap="#png::reader&lt; istream &gt;_map" alt=""/>
  <map id="png::reader&lt; istream &gt;_map" name="png::reader&lt; istream &gt;_map">
<area href="classpng_1_1io__base.html" title="Base class for PNG reader/writer classes." alt="png::io_base" shape="rect" coords="0,0,141,24"/>
</map>
 </div></div>

<p><a href="classpng_1_1reader-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpng_1_1reader.html#add29db689e5ee6543a6bf68491018521">reader</a> (istream &amp;stream)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a reader prepared to read PNG image from a <em>stream</em>.  <a href="#add29db689e5ee6543a6bf68491018521"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpng_1_1reader.html#a877cbc18291159ca94b1acbc224f3ef4">~reader</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpng_1_1reader.html#a426065ee445481d599162d0e22c97214">read_png</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the whole PNG data stream into memory. Not particularly useful.  <a href="#a426065ee445481d599162d0e22c97214"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpng_1_1reader.html#a5dc827c5e9a113f8821c1ff08b2ab111">read_info</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads info about PNG image.  <a href="#a5dc827c5e9a113f8821c1ff08b2ab111"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpng_1_1reader.html#a07f8235aab8059260b4857feba579ccb">read_row</a> (<a class="el" href="namespacepng.html#ac0e0e2e09bdd9a287618bfdc5f31ca52">byte</a> *bytes)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a row of image data at a time.  <a href="#a07f8235aab8059260b4857feba579ccb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpng_1_1reader.html#a198c8345b97ddfac9f2f7474f196f45c">read_end_info</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads ending info about PNG image.  <a href="#a198c8345b97ddfac9f2f7474f196f45c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpng_1_1reader.html#ae38d4ce06488e1addb6e5ff0c8e54a58">update_info</a> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;class istream&gt;<br/>
class png::reader&lt; istream &gt;</h3>

<p>The PNG reader class template. This is the low-level reading interface--use image class or consumer class to actually read images. </p>
<p>The <code>istream</code> template parameter specifies the type of input stream to work with. The <code>istream</code> class should implement the minimum of the following interface:</p>
<div class="fragment"><pre class="fragment"> <span class="keyword">class </span>my_istream
 {
 <span class="keyword">public</span>:
     <span class="keywordtype">void</span> read(<span class="keywordtype">char</span>*, <span class="keywordtype">size_t</span>);
     <span class="keywordtype">bool</span> good();
 };
</pre></div><p>With the semantics similar to the <code>std::istream</code>. Naturally, <code>std::istream</code> fits this requirement and can be used with the reader class as is.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classpng_1_1image.html" title="Class template to represent PNG image.">image</a>, <a class="el" href="classpng_1_1consumer.html" title="Pixel consumer class template.">consumer</a>, <a class="el" href="classpng_1_1writer.html" title="PNG writer class template. This is the low-level writing interface--use image class or generator clas...">writer</a>, <a class="el" href="classpng_1_1io__base.html" title="Base class for PNG reader/writer classes.">io_base</a> </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="add29db689e5ee6543a6bf68491018521"></a><!-- doxytag: member="png::reader::reader" ref="add29db689e5ee6543a6bf68491018521" args="(istream &amp;stream)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class istream&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpng_1_1reader.html">png::reader</a>&lt; istream &gt;::<a class="el" href="classpng_1_1reader.html">reader</a> </td>
          <td>(</td>
          <td class="paramtype">istream &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td><code> [inline, explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs a reader prepared to read PNG image from a <em>stream</em>. </p>

<p>References <a class="el" href="classpng_1_1io__base.html#a343eb5ab2ad984e7020d8489b64ec9d2">png::io_base::m_png</a>.</p>

</div>
</div>
<a class="anchor" id="a877cbc18291159ca94b1acbc224f3ef4"></a><!-- doxytag: member="png::reader::~reader" ref="a877cbc18291159ca94b1acbc224f3ef4" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class istream&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpng_1_1reader.html">png::reader</a>&lt; istream &gt;::~<a class="el" href="classpng_1_1reader.html">reader</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>References <a class="el" href="classpng_1_1info__base.html#afe70c0d333349a9b5fc7a1d046fc3fbc">png::info_base::get_png_info_ptr()</a>, <a class="el" href="classpng_1_1io__base.html#a4dc235d3aa8764d1a1a73c6d1fefed61">png::io_base::m_end_info</a>, <a class="el" href="classpng_1_1io__base.html#a3253298a348305da3f3b6cf38f201300">png::io_base::m_info</a>, and <a class="el" href="classpng_1_1io__base.html#a343eb5ab2ad984e7020d8489b64ec9d2">png::io_base::m_png</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a426065ee445481d599162d0e22c97214"></a><!-- doxytag: member="png::reader::read_png" ref="a426065ee445481d599162d0e22c97214" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class istream&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpng_1_1reader.html">png::reader</a>&lt; istream &gt;::<a class="el" href="classpng_1_1reader.html#a426065ee445481d599162d0e22c97214">read_png</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads the whole PNG data stream into memory. Not particularly useful. </p>

<p>References <a class="el" href="classpng_1_1info__base.html#a030a8262a2ef1bf8c97a2eafe71c2f3c">png::info_base::get_png_info()</a>, <a class="el" href="classpng_1_1io__base.html#a0525d690575be17366b555672bac823e">png::io_base::m_error</a>, <a class="el" href="classpng_1_1io__base.html#a3253298a348305da3f3b6cf38f201300">png::io_base::m_info</a>, and <a class="el" href="classpng_1_1io__base.html#a343eb5ab2ad984e7020d8489b64ec9d2">png::io_base::m_png</a>.</p>

</div>
</div>
<a class="anchor" id="a5dc827c5e9a113f8821c1ff08b2ab111"></a><!-- doxytag: member="png::reader::read_info" ref="a5dc827c5e9a113f8821c1ff08b2ab111" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class istream&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpng_1_1reader.html">png::reader</a>&lt; istream &gt;::<a class="el" href="classpng_1_1reader.html#a5dc827c5e9a113f8821c1ff08b2ab111">read_info</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads info about PNG image. </p>

<p>References <a class="el" href="classpng_1_1io__base.html#a0525d690575be17366b555672bac823e">png::io_base::m_error</a>, <a class="el" href="classpng_1_1io__base.html#a3253298a348305da3f3b6cf38f201300">png::io_base::m_info</a>, <a class="el" href="classpng_1_1io__base.html#a343eb5ab2ad984e7020d8489b64ec9d2">png::io_base::m_png</a>, and <a class="el" href="classpng_1_1info.html#a8788080158fc7450911516c23d4b584c">png::info::read()</a>.</p>

<p>Referenced by <a class="el" href="classpng_1_1consumer.html#a09c64f854a6bc39ec63dfa157958dc9b">png::consumer&lt; pixel, pixel_consumer, image_info_ref_holder, true &gt;::read()</a>.</p>

</div>
</div>
<a class="anchor" id="a07f8235aab8059260b4857feba579ccb"></a><!-- doxytag: member="png::reader::read_row" ref="a07f8235aab8059260b4857feba579ccb" args="(byte *bytes)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class istream&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpng_1_1reader.html">png::reader</a>&lt; istream &gt;::<a class="el" href="classpng_1_1reader.html#a07f8235aab8059260b4857feba579ccb">read_row</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacepng.html#ac0e0e2e09bdd9a287618bfdc5f31ca52">byte</a> *&#160;</td>
          <td class="paramname"><em>bytes</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads a row of image data at a time. </p>

<p>References <a class="el" href="classpng_1_1io__base.html#a0525d690575be17366b555672bac823e">png::io_base::m_error</a>, and <a class="el" href="classpng_1_1io__base.html#a343eb5ab2ad984e7020d8489b64ec9d2">png::io_base::m_png</a>.</p>

</div>
</div>
<a class="anchor" id="a198c8345b97ddfac9f2f7474f196f45c"></a><!-- doxytag: member="png::reader::read_end_info" ref="a198c8345b97ddfac9f2f7474f196f45c" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class istream&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpng_1_1reader.html">png::reader</a>&lt; istream &gt;::<a class="el" href="classpng_1_1reader.html#a198c8345b97ddfac9f2f7474f196f45c">read_end_info</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads ending info about PNG image. </p>

<p>References <a class="el" href="classpng_1_1io__base.html#a4dc235d3aa8764d1a1a73c6d1fefed61">png::io_base::m_end_info</a>, <a class="el" href="classpng_1_1io__base.html#a0525d690575be17366b555672bac823e">png::io_base::m_error</a>, <a class="el" href="classpng_1_1io__base.html#a343eb5ab2ad984e7020d8489b64ec9d2">png::io_base::m_png</a>, and <a class="el" href="classpng_1_1end__info.html#a6ea148edf8c9d0394d055bfe34461524">png::end_info::read()</a>.</p>

<p>Referenced by <a class="el" href="classpng_1_1consumer.html#a09c64f854a6bc39ec63dfa157958dc9b">png::consumer&lt; pixel, pixel_consumer, image_info_ref_holder, true &gt;::read()</a>.</p>

</div>
</div>
<a class="anchor" id="ae38d4ce06488e1addb6e5ff0c8e54a58"></a><!-- doxytag: member="png::reader::update_info" ref="ae38d4ce06488e1addb6e5ff0c8e54a58" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class istream&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpng_1_1reader.html">png::reader</a>&lt; istream &gt;::<a class="el" href="classpng_1_1reader.html#ae38d4ce06488e1addb6e5ff0c8e54a58">update_info</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>References <a class="el" href="classpng_1_1io__base.html#a3253298a348305da3f3b6cf38f201300">png::io_base::m_info</a>, and <a class="el" href="classpng_1_1info.html#a544c5e25c4211ef33976e3ac2b2ea020">png::info::update()</a>.</p>

<p>Referenced by <a class="el" href="classpng_1_1consumer.html#a09c64f854a6bc39ec63dfa157958dc9b">png::consumer&lt; pixel, pixel_consumer, image_info_ref_holder, true &gt;::read()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="reader_8hpp_source.html">reader.hpp</a></li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri Jan 25 2013 14:10:10 for png++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
